package com.easygo.controller;

import com.easygo.service.IGoodsService;
import com.xuexi.easygo.pojo.Goods;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Scope("prototype")
public class GoodsController {

    @Autowired
    IGoodsService goodsService;

    @RequestMapping("goods_getGoods")
    public List<Goods> getGoods(@RequestParam(value = "is_marketable") Integer is_marketable){
        return goodsService.getGoods(is_marketable);
    }
}
